<template>
  <div class="flowMonitoring">
    <TitleColumn name="流量实时监测" isColumn/>
    <div class="content">
      <MonitorTable />
    </div>
  </div>
</template>

<script lang="ts" setup>
  import { reactive } from 'vue';
  import TitleColumn from '@/components/TitleColumn';
  import MonitorTable from './MonitorTable/index.vue';

  defineOptions({ name: 'FlowMonitoring' });
</script>

<style lang="less" rel="stylesheet/less" scoped>
  .flowMonitoring {
    width: calc(50% - 10px);
    height: 100%;
    display: flex;
    flex-direction: column;
    grid-row-gap: 10px;
    box-sizing: border-box;
    background: #02123433;
    backdrop-filter: blur(10px);
    .content {
      width: 100%;
      height: 100%;
      overflow: hidden;
      position: relative;
      .total {
        width: 630px;
        height: 58px;
        background: url(./images/bg.png) no-repeat;
        background-size: 100% 100%;
        position: relative;
        margin-bottom: 10px;
        .device {
          position: absolute;
          top: 8px;
          left: 18px;
          color: #fff;
          font-size: 16px;
          display: flex;
          align-items: center;
          strong {
            font-size: 24px;
            padding: 0 4px 0 10px;
          }
        }
        .online {
          position: absolute;
          top: 12px;
          left: 200px;
          color: #fff;
          font-size: 16px;
          display: flex;
          align-items: center;
          justify-content: center;
          strong {
            font-size: 18px;
            padding: 0 4px 0 10px;
          }
          i.icon1 {
            display: inline-block;
            width: 30px;
            height: 30px;
            background: url(./images/icon1.png) no-repeat;
            background-size: contain;
            margin-right: 10px;
          }
        }
        .offline {
          position: absolute;
          top: 12px;
          left: 430px;
          color: #fff;
          font-size: 16px;
          display: flex;
          align-items: center;
          justify-content: center;
          strong {
            font-size: 18px;
            padding: 0 4px 0 10px;
          }
          i.icon2 {
            display: inline-block;
            width: 30px;
            height: 30px;
            background: url(./images/icon2.png) no-repeat;
            background-size: contain;
            margin-right: 10px;
          }
        }
      }
      .tableScrollWrap {
        width: 100%;
        height: calc(100% - 60px);
        min-height: 170px !important;
        overflow: hidden;
        overflow-y: auto;
        &::-webkit-scrollbar {
          width: 0;
          height: 0;
        }
      }
      ul.list {
        width: 100%;
        height: 100%;
        padding: 0 10px 0px 10px;
        li.listItem {
          width: 630px;
          height: 40px;
          background: url(./images/list.png) no-repeat;
          background-size: 100% 100%;
          margin-bottom: 6px;
          display: flex;
          align-items: center;
          justify-content: space-between;
          color: #fff;
          .time {
            width: 144px;
            display: flex;
            align-items: center;
            padding: 0 6px 0 0px;
            font-size: 12px;
            i.icon {
              display: inline-block;
              width: 22px;
              height: 22px;
              background: url(./images/time.png) no-repeat;
              background-size: contain;
              margin-right: 4px;
            }
          }
          .name {
            width: 90px;
            font-size: 13px;
          }
          .value {
            width: 100px;
            font-size: 13px;
          }
          .warning {
            width: 150px;
            display: flex;
            align-items: center;
            font-size: 13px;
            .warn {
              padding: 1px 8px;
              background: linear-gradient(90deg, rgba(255, 92, 0, 0.6) 0%, rgba(255, 48, 54, 0.6) 97.22%);
              border: 1px solid;
              border-image: linear-gradient(90deg, #FF3036 0%, rgba(255, 255, 255, 0.72) 48.62%, rgba(255, 48, 54, 0.96) 100%);
              border-image-slice: 1;
            }
          }
        }
      }
    }
  }
</style>
